package com.midian.model.activity.vo;

import java.util.Date;
import javax.persistence.Transient;

import com.midian.common.system.SysStatic;
import com.midian.common.utils.DateUtils;
import com.midian.common.utils.StringUtil;
import com.midian.model.activity.ActivityUser;
import com.midian.model.common.BaseModel;
import com.midian.service.user.IUserService;

/**
 * 活动用户（报名）
 * 
 */

public class ActivityUserVO extends BaseModel {
	/**订单号*/
	private String orderSn;
	private String account;
	private Integer joinState;
	private String title;
	private String detail;
	private String contanctName;
	private String contanctPhone;
	private Integer adultCount;
	private Integer childCount;
	private Double adultPrice;
	private Double childPrice;
	private Integer userFrom;
	private String beginTimeStr;
	private String endTimeStr;
	
	
	public String getBeginTimeStr() {
		return beginTimeStr;
	}


	public void setBeginTimeStr(String beginTimeStr) {
		this.beginTimeStr = beginTimeStr;
	}


	public String getEndTimeStr() {
		return endTimeStr;
	}


	public void setEndTimeStr(String endTimeStr) {
		this.endTimeStr = endTimeStr;
	}


	public Integer getUserFrom() {
		return userFrom;
	}


	public void setUserFrom(Integer userFrom) {
		this.userFrom = userFrom;
	}


	public void setOrderSn(String orderSn) {
		this.orderSn = orderSn;
	}


	public String getAccount() {
		return account;
	}


	public void setAccount(String account) {
		this.account = account;
	}


	public Integer getJoinState() {
		return joinState;
	}


	public void setJoinState(Integer joinState) {
		this.joinState = joinState;
	}


	public String getTitle() {
		return title;
	}


	public void setTitle(String title) {
		this.title = title;
	}


	public String getDetail() {
		return detail;
	}


	public void setDetail(String detail) {
		this.detail = detail;
	}


	public String getContanctName() {
		return contanctName;
	}


	public void setContanctName(String contanctName) {
		this.contanctName = contanctName;
	}


	public String getContanctPhone() {
		return contanctPhone;
	}


	public void setContanctPhone(String contanctPhone) {
		this.contanctPhone = contanctPhone;
	}


	public Integer getAdultCount() {
		return adultCount;
	}


	public void setAdultCount(Integer adultCount) {
		this.adultCount = adultCount;
	}


	public Integer getChildCount() {
		return childCount;
	}


	public void setChildCount(Integer childCount) {
		this.childCount = childCount;
	}


	public Double getAdultPrice() {
		return adultPrice;
	}


	public void setAdultPrice(Double adultPrice) {
		this.adultPrice = adultPrice;
	}


	public Double getChildPrice() {
		return childPrice;
	}


	public void setChildPrice(Double childPrice) {
		this.childPrice = childPrice;
	}

	/**用户是否报名成功*/
	public String getIsJoinDesc() {
		String isJoinDesc = "";
		if(SysStatic.ACTIVITY_USER_IS_JOIN.equals(this.joinState)) {
			isJoinDesc = "报名成功（已付款）";
		} else {
			isJoinDesc = "未付款";
		}
		return isJoinDesc;
	}
	
	/**活动报名活动详情预览*/
	public String getActivityDetailTips(){
		String activityDetailTips = "";
		if (this.detail!=null) {
				activityDetailTips = StringUtil.replaceToHtmlQuot(this.detail);
		}
		return activityDetailTips;
	}
	
	public String getOrderSn() {
		return orderSn;
	}


	/**
	 * 帐号描述信息
	 * 
	 * @return
	 */
	@Transient
	public String getAccountDesc() {
		String accountDesc = "";
			if (IUserService.USER_FROM_NORMAL.equals(userFrom)) {
				accountDesc = account;
			} else if (IUserService.USER_FROM_QQ.equals(userFrom)) {
				accountDesc = "QQ用户";
			} else if (IUserService.USER_FROM_WECHAT.equals(userFrom)) {
				accountDesc = "微信用户";
			}
		return accountDesc;
	}
	
	
	/**
	 * 转换日期格式
	 * 
	 * @return
	 */
	@Transient
	public String getCreateTimeDesc() {
		return DateUtils.fotmatDate3(super.getCreateTime());
	}
	
	
}
